﻿module Lhz.Interface.Page {
    export interface ManagementPageOptions<T extends Lhz.Entity.ServiceCenter.DbEntity> {
        targetName: string,
        serviceNo?: string;
        colModel: any[],
        width: number,
        height: number,
        getItemName: (mp: Lhz.Page.ManagementPage<T>, item: T) => string;
        dbOperation?: boolean,
        data?: T[],
        tableSelector?: string,
        getQueryArguments?: (mp: Lhz.Page.ManagementPage<T>) => any[];
        queryOperationNo?: string,
        buttonAddSelector?: string,
        addOperationName?: string,
        buttonEditSelector?: string,
        editOperationName?: string,
        detailPageUrl?: string,
        getDetailArguments?: (mp: Lhz.Page.ManagementPage<T>, selectedItem: T) => any;
        buttonDeleteSelector?: string,
        deleteOperationName?: string,
        getDeleteArguments?: (mp: Lhz.Page.ManagementPage<T>, selectedItems: T[]) => any[];
        deleteOperationNo?: string,
        childrenDeleteServiceNos?: string[],
        childrenDeleteOperationNos?: string[],
        getChildrenDeleteArgumentsList?: (mp: Lhz.Page.ManagementPage<T>, selectedItems: T[]) => any[][];
        deleteCheck?: (mp: Lhz.Page.ManagementPage<T>, selectedItems: T[], deleteCheckCallback: (names: string[]) => void) => void;
        saveStart?: (mp: Lhz.Page.ManagementPage<T>) => void;
        initiate?: (mp: Lhz.Page.ManagementPage<T>, initStartCallback: (mp: Lhz.Page.ManagementPage<T>) => void) => void;
        initialized?: (mp: Lhz.Page.ManagementPage<T>) => void;
    }
}
